src/OpenSSL/crypto.py: support SM2 sign with OpenSSL 1.1.1x#1172
src/OpenSSL/crypto.py: support SM2 sign with OpenSSL 1.1.1x#1172hustliyilin wants to merge 1 commit intopyca:mainfrom
Conversation
|
Hi, CI/CD still has a failing check. I don't know what caused it and how to fix it. Can you give me some help or tips? |
|
It's caused by the reduction in coverage since there are no tests for this code. |
OK, thanks @alex , I will add the tests for this codes as soon as possible. |
c4aa1ec to
31d316d
Compare
|
Hello @alex , I added the tests and rebased the latest codes already. Besides, I downloaded the corresponding CI/CD ( However, the CI/CD still has the failing checks. I don't quite know why. Could you help me? Thanks a lot. |
|
Many of the jobs in our CI run against versions of cryptography compiled against other OpenSSL versions. These do not have SM2 support, so the test suite needs to properly detect support and skip if it isn’t available. |
In openssl 1.1.1 docs/man3/EVP_PKEY_set1_RSA.pod (https://github.com/openssl/openssl/blob/OpenSSL_1_1_1/doc/man3/EVP_PKEY_set1_RSA.pod) The EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2) API is possible to convert it to using SM2 algorithms After loading an ECC key. Besides, pyca/cryptography support to export `The EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2) API` in pyca/cryptography@c28bfb3 . So in pyopenssl, we can support SM2 sign with OpenSSL 1.1.1x and pyca/cryptography. Signed-off-by: YiLin.Li <YiLin.Li@linux.alibaba.com>
|
@alex , Now all CI/CDs passed. Could you review it again? Thanks a lot. |
|
Still waiting for this pr to work, mates. |
|
Signing support has been removed from pyOpenSSL. |


In openssl 1.1.1 docs/man3/EVP_PKEY_set1_RSA.pod
(https://github.com/openssl/openssl/blob/OpenSSL_1_1_1/doc/man3/EVP_PKEY_set1_RSA.pod) The EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2) API is possible to convert it to using SM2 algorithms After loading an ECC key.
Besides, pyca/cryptography support to export
The EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2) APIin pyca/cryptography@c28bfb3 .So in pyopenssl, we can support SM2 sign with OpenSSL 1.1.1x and pyca/cryptography.
Fixes: #1171
Signed-off-by: YiLin.Li YiLin.Li@linux.alibaba.com